package com.module.app.ext

import com.module.app.bus.UpdateBus
import kotlinx.coroutines.flow.MutableSharedFlow

/**
 *  双重校验锁式-单例   登录状态
 *  LiveData 已经取消不用了
 */
//val loginFlow: MutableLiveData<Boolean> by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
//    MutableLiveData()
//}

/**
 *  双重校验锁式-单例   登录状态
 */
val loginFlow: MutableSharedFlow<Boolean> by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
    MutableSharedFlow()
}


/**
 *  双重校验锁式-单例   账号被顶
 */
val loginTopFlow: MutableSharedFlow<Any> by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
    MutableSharedFlow()
}

/**
 *  双重校验锁式-单例   修改用户信息
 */
val modifyUserFlow: MutableSharedFlow<Any> by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
    MutableSharedFlow()
}

/**
 *  双重校验锁式-单例   更新状态
 */
val updateFlow: MutableSharedFlow<UpdateBus> by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
    MutableSharedFlow()
}

/**
 *  双重校验锁式-单例   表情删除点击
 */
val emojiDelBtnFlow: MutableSharedFlow<Boolean> by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
    MutableSharedFlow()
}

/**
 *  双重校验锁式-单例   表情发送点击
 */
val emojiSendBtnFlow: MutableSharedFlow<com.module.app.emoji.bean.Emoji> by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
    MutableSharedFlow()
}



